const files = require.context('.', false, /\.js$/)

// console.log('------>files: ', files)
// console.log('----->files.keys(): ', files.keys())

const dynamicRouter = []
const arr = files.keys().filter(key => key !== './index.js')

arr.forEach(v => {
  console.log('file-v:', files(v))
  // dynamicRouter.push(files(v).default)
  dynamicRouter.push(files(v).default)
})

// console.log('dynamicRouter:', dynamicRouter)

export default dynamicRouter
